import xlwt

workbook = xlwt.Workbook(encoding="utf-8")
worksheet = workbook.add_sheet("sheet1") # 创建一个名为sheet1的工作区

for i in range(1,10):
    for j in range(1, i+1):
        worksheet.write(i-1,j-1, str(j) + " * "+ str(i) + " = "+ str(i * j))

workbook.save("student.xls")